Velocity (JavaScript library)
part 8/12 · 18.4 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
// Reverse the previous animation; animate back to the element's original height using the previous duration
$element.velocity("reverse");
Velocity's reverse command defaults to the animation options used in the prior call. Passing in a new options object extends the previous one:
$element.velocity({ height: "500px" }, { duration: 500 });
// Extend the previous reverse call's options object with a new duration value
$element.velocity("reverse", { duration: 1000 });
History
Velocity was developed by Julian Shapiro to address a lack of performant and designer-oriented JavaScript animation libraries.cite-ref-16[16]cite-ref-17[17] Stripe, a popular web developer-focused Internet technology company sponsored Shapiro on a grant to help provide the financial resources necessary to continue full-time development on Velocity.cite-ref-18[18]
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────